package com.spsoft.vatoutinv.enums;

/**
 * 冲红原因枚举类
 *
 * @author : chenxudong
 * @date : 2024/1/23 10:49
 */
public enum ChyyEnum {

    CHYY_01("01", "开票有误"),
    CHYY_02("02", "销货退回"),
    CHYY_03("03", "服务中止"),
    CHYY_04("04", "销售折让");

    public final String key;
    public final String value;

    ChyyEnum(String key , String value){
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByKey(String key){
        for (ChyyEnum status : ChyyEnum.values()) {
            if(status.getKey().equals(key)){
                return status.getValue();
            }
        }
        return null;
    }
}
